package cn.javass.dp.command.example6;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 菜单
 */
public class MenuCommand implements Command {

    private Collection<Command> commands = new ArrayList<>();


    @Override
    public int getTableNum() {
        //什么都不用做
        return tableNum;
    }

    @Override
    public void setCookApi(CookApi cookApi) {
        //什么都不用做
    }


    public Collection<Command> getCommands() {
        return commands;
    }

    public void setCommands(Collection<Command> commands) {
        this.commands = commands;
    }

    public void addCommand(Command cmd) {
        commands.add(cmd);
    }

    private int tableNum;



    public void setTableNum(int tableNum) {
        this.tableNum = tableNum;
    }

    //宏命令
    @Override
    public void execute() {
      /*  for (Command command : commands) {
            command.execute();
        }*/

       //将菜单交给队列  厨师从队列里面去取
        CommandQueue.addMenu(this);
    }



}
